<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="lib/jquery-3.3.1.js"></script>
    <style>
    h1{
        text-align: center;
        cursor: pointer;
    }
    div.one{
        height: 100px;
        background: slateblue;
        font-size: 30px;
        color: skyblue;
        text-align: center;
        margin-top: 1600px;
    }
    div{
        height: 100px;
        background: salmon;
        font-size: 30px;
        color: skyblue;
        text-align: center;
        margin-top: 1600px;
    }
    </style>
</head>
<body>
    <h1>关于我</h1>
    <div class="one">one</div>
    <div class="two">two</div>
    <script>
      $(function(){
          $("h1").click(function(){
              var offset = $(".one").offset().top;
              $("html,body").animate({scrollTop:offset},1000)
              console.log(offset);
          })
      })
    </script>
    
</body>
</html>